package #(package);

import org.springframework.web.bind.annotation.*;

import #(packageBase).api.fallback.#(className)Api;
import #(packageBase).model.#(className);
import #(packageBase).vo.JsonResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
* #(comments) fegin接口熔断
*
* @author #(author)
* @date #(datetime)
*/
@Slf4j
@Component
public class #(className)ApiFallback implements #(className)ApiService {

	@Override
	public JsonResult info(@PathVariable #(pk.attrType) #(pk.attrname)){
		JsonResult.fail("请求失败，接口被熔断")
	}

	@Override
	public JsonResult list(@RequestParam Map<String, Object> params){
		JsonResult.fail("请求失败，接口被熔断")
	}

	@Override
	public JsonResult save(@RequestBody #(className) #(classname)){
		JsonResult.fail("请求失败，接口被熔断")
	}

	@Override
	public JsonResult update(#(className) #(classname)){
		JsonResult.fail("请求失败，接口被熔断")
	}

	@Override
	public JsonResult delete(@PathVariable #(pk.attrType) #(pk.attrname)){
		JsonResult.fail("请求失败，接口被熔断")
	}

}
